<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/react.development.js"></script>
    <script src="js/react-dom.development.js"></script>   
    <script src="js/babel.min.js"></script>
</head>
<body>
    <div id="root"></div>

    <script type="text/babel">
        class Helloworld extends React.Component{

            componentDidMount(){
                console.log('componentDidMount');
            }
            
            componentWillUnmount(){
                console.log('componentWillUnmount');
            }            

            render(){
                return(
                    <h1>Hello world!</h1>
                )
            }
        }

        ReactDOM.render(<Helloworld />, document.getElementById('root'));
        

        setTimeout(() => {
        ReactDOM.render(<h1>Bye Bye!</h1>, document.getElementById('root')); 
        }, 3000);
    
    </script>
</body>
</html>